package com.kexio.user.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.kexio.common.entity.BaseEntity;

/**
 * 用户数据权限范围实体
 * 
 * 对应数据库表 sys_user_data_scope
 * 存储用户级别的数据权限范围配置
 * 
 * @author kexio
 * @since 1.0.0
 */
@TableName("sys_user_data_scope")
public class UserDataScope extends BaseEntity {
    
    /**
     * 主键ID
     */
    @TableId(value = "id", type = IdType.ASSIGN_ID)
    private String id;
    
    /**
     * 用户ID
     */
    @TableField("user_id")
    private String userId;
    
    /**
     * 部门ID
     */
    @TableField("dept_id")
    private String deptId;
    
    /**
     * 权限范围类型：ALL-全部, DEPT-本部门, DEPT_AND_CHILD-本部门及子部门, CUSTOM-自定义, SELF-仅自己
     */
    @TableField("scope_type")
    private String scopeType;
    
    // ==================== Getters and Setters ====================
    
    public String getId() { 
        return id; 
    }
    
    public void setId(String id) { 
        this.id = id; 
    }
    
    public String getUserId() { 
        return userId; 
    }
    
    public void setUserId(String userId) { 
        this.userId = userId; 
    }
    
    public String getDeptId() { 
        return deptId; 
    }
    
    public void setDeptId(String deptId) { 
        this.deptId = deptId; 
    }
    
    public String getScopeType() { 
        return scopeType; 
    }
    
    public void setScopeType(String scopeType) { 
        this.scopeType = scopeType; 
    }
    
    // ==================== ToString ====================
    
    @Override
    public String toString() {
        return "UserDataScope{" +
                "id='" + id + '\'' +
                ", userId='" + userId + '\'' +
                ", deptId='" + deptId + '\'' +
                ", scopeType='" + scopeType + '\'' +
                ", " + super.toString() +
                '}';
    }
}
